<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../../include/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<meta charset="utf-8" />
<title>汽车驿站</title>
<%@include file="../../include/inhead.jsp"%>

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- 兼容 双核浏览器 -->
<meta name="renderer" content="webkit" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<link rel="shortcut icon" href="" />
<link rel="stylesheet" type="text/css" href="${ctx }/static/css/xc/autoinn/font-awesome.min.css" />
<style type="text/css">
body {
	font-family: "Helvetica Neue", Helvetica, "Lucida Grande", "Luxi Sans",
		Arial, "Hiragino Sans GB", STHeiti, "Microsoft YaHei",
		"Wenquanyi Micro Hei", "WenQuanYi Micro Hei Mono", "WenQuanYi Zen Hei",
		"WenQuanYi Zen Hei Mono", LiGothicMed;
	background-color: #DFDFDF;
}

.container {
	margin: 0 auto;
	width: 320px;
	margin-top: 50px;
	position: relative;
	color: #6F6F6F;
}

.text1 {
	font-size: 25px;
	font-weight: bold;
}

.text2 {
	font-size: 16px;
	padding-top: 10px;
}

.text3 {
	padding-top: 5px;
	font-size: 16px;
	padding-right: 10px;
}

.text4 {
	font-size: 95px;
	color: #cacaca;
	text-shadow: 1px 1px 6px;
	padding-top: 50px;
}

.back {
	margin-top: 25px;
}

.link {
	font-size: 16px;
	color: #EF8A55;
	text-decoration: none;
	padding-right: 10px;
}

.link:hover {
	text-decoration: underline;
}

.pt-15 {
	padding-top: 15px;
}

.pr-10 {
	padding-right: 10px;
}

.logo {
	width: 100px;
	height: 100px;
}

.text-center {
	text-align: center;
}
</style>
<script type="text/javascript">
            $(document).ready(function(){
            	
                try{
                    function onBridgeReady(){
                        WeixinJSBridge.invoke('getBrandWCPayRequest', {
                        	 "appId" : "${appid}", //公众号名称，由商户传入
                             "timeStamp" : "${timeStamp}", //时间戳
                             "nonceStr" : "${nonceStr}", //随机串
                             "package" : "${package}", //扩展包
                             "signType" : "MD5", //微信签名方式:MD5
                             "paySign" : "${paySign}" //微信签名  
                            }, function(res){
                                if(res.err_msg == "get_brand_wcpay_request:ok"){
                                     alert("支付成功");
                                    window.location.href = ctx+"/weixin/f/autoinn/xc/userpay/dinglist";
                                }
                                else{
                                    alert("支付失败，请重新操作\n" + res.err_msg);
                                    history.go(-1);
                                }
                            }
                        );
                    }

                    if(typeof(WeixinJSBridge) == "undefined"){
                        if( document.addEventListener ){
                            document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
                        }else if (document.attachEvent){
                            document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
                            document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
                        }
                    }else{
                        onBridgeReady();
                    }
                }
                catch(e) {
                    alert(e);
                }
            });
        </script>
</head>
<body>
	<div class="container">
		<div class="text-center">
			<div class="">
				 <img class="logo" src="${ctxStatic }/images/logo_white.png"/> 
			</div>
			${urkl }
			<span></span>
			<div class="text2">请稍后，微信支付接口调取中...</div>
		</div>
	</div>
</body>
</html>
